@extends('layouts.app')

@section('content')
<div class="container">
    @if($project)
        @foreach($project as $v)
            <div class="col-sm-3 col-md-3">
                 <div class="thumbnail">
                    <div class="sa">
                        <ul class="icon-bar">
                            <li>
                                @include('project/delete')
                            </li>
                            <li>
                                <button type="button" class="btn " data-toggle="modal" data-target="#editmodal-{{$v->id}}">
                                    <i class="fa-btn fa fa-cog"></i>
                                </button>

                            </li>
                        </ul>
                        @include('project/edit')
                    </div>
                    <a href="{{route('project.show',$v->id)}}">
                        <img src="{{asset('thum/'.$v->thum)}}"
                         alt="{{$v->name}}">
                    </a>
                    <a href="{{route('project.show',$v->id)}}">
                        <div class="caption">
                            <h4 class='text-center'>{{$v->name}}</h4>
                        </div>
                    </a>
                 </div>

            </div>
        @endforeach
    @endif
    <div class="row">
        <div class="col-sm-3 col-md-3 create" >
             @include('project/create_project')
        </div>
    </div>
</div>
@endsection

@section('projectlistJS')
<script >
    $(document).ready(function (){
        $('.icon-bar').hide();
        $('.thumbnail').hover(function() {
            $(this).find('.icon-bar').toggle()
        });
    })
</script>
@endsection